import { message } from 'ant-design-vue'

interface FormState {
  originalPassword: string
  password: string
  affirmPassword: string
}
export const verify = (obj: FormState) => {
  if (!obj.originalPassword || obj.originalPassword == '') {
    message.error('请输入原始密码', 1)
    return false
  }
  if (!obj.password || obj.password == '') {
    message.error('请输入新密码', 1)
    return false
  }
  if (!obj.affirmPassword || obj.affirmPassword == '' || obj.password !== obj.affirmPassword) {
    message.error('请确认新密码', 1)
    return false
  }
  return true
}
